﻿<dialogs:DialogWindow x:Class="Mnk.TBox.Plugins.BookletPagesGenerator.Dialog"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:loc="clr-namespace:Mnk.TBox.Plugins.BookletPagesGenerator.Code.Localization"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                                     xmlns:dialogs="clr-namespace:Mnk.Library.WpfControls.Dialogs;assembly=Mnk.Library.WPFControls"
                      xmlns:components="clr-namespace:Mnk.Library.WpfControls.Components;assembly=Mnk.Library.WPFControls"
                      xmlns:captioned1="clr-namespace:Mnk.Library.WpfControls.Components.Captioned;assembly=Mnk.Library.WPFControls"
                      mc:Ignorable="d" 
             ShowInTaskbar="True"
             Title="{loc:Tr PluginName}"
             Height="300" Width="480" MinHeight="300" MinWidth="480"
             FocusManager.FocusedElement="{Binding ElementName=nudTotalPages}">
    <DockPanel>
        <DockPanel DockPanel.Dock="Top">
            <GroupBox Header="{loc:Tr Info}" DockPanel.Dock="Right" Width="130">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Label Content="{loc:Tr Pages}" Grid.Row="0" Padding="0"/>
                    <Label Name="lPagesCount" Grid.Row="0" Grid.Column="1" Padding="0"/>
                    <Label Content="{loc:Tr Range}" Grid.Row="1" Padding="0"/>
                    <Label Name="lRange" Grid.Row="1" Grid.Column="1" Padding="0"/>
                    <Label Content="{loc:Tr Steps}" Grid.Row="2" Padding="0"/>
                    <Label Name="lSteps" Grid.Row="2" Grid.Column="1" Padding="0"/>
                    <Label Content="{loc:Tr Position}" Grid.Row="3" Padding="0"/>
                    <Label Name="lUpOrDown" Grid.Row="3" Grid.Column="1" Padding="0"/>
                </Grid>
            </GroupBox>
            <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
                <captioned1:CaptionedNumericUpDown Caption="{loc:Tr PagesOffset}" Margin="5" Width="100" Value="{Binding PagesOffset}" ValueChanged="nudPagesOffset_ValueChanged" Name="nudPagesOffset"/>
                <captioned1:CaptionedNumericUpDown Caption="{loc:Tr TotalPages}"  Margin="5" Width="100" Value="{Binding TotalPages}" ValueChanged="nudTotalPages_ValueChanged" Name="nudTotalPages"/>
                <captioned1:CaptionedNumericUpDown Caption="{loc:Tr PagesToPrint}" Margin="5" Width="100" Value="{Binding PagesToPrint}" ValueChanged="nudPagesToPrintCount_ValueChanged" Name="nudPagesToPrintCount"/>
            </StackPanel>
            <captioned1:CaptionedTextBox Caption="{loc:Tr CurrentLine}" DockPanel.Dock="Top" Margin="5" Name="tbPages"/>
        </DockPanel>
        <DockPanel DockPanel.Dock="Bottom">
            <Button Name="btnPrev" Content="{loc:Tr Prev}" Click="OnPrevClick"/>
            <Button Name="btnNext" Content="{loc:Tr Next}" Click="OnNextClick"/>
            <Button Content="{loc:Tr Cancel}" DockPanel.Dock="Right" IsCancel="True" Click="CancelClick"/>
            <Button Name="btnGenerate" Content="{loc:Tr Generate}" DockPanel.Dock="Right" Click="OnGenerateClick" IsDefault="True"/>
            <Label/>
        </DockPanel>
        <components:ExtListBox Name="lbResult"/>
    </DockPanel>
</dialogs:DialogWindow>
